export default class createEvent {
    constructor(data) {
        this.data = data
        this._createEvent()
        this._setAttribute(this.event,this.data.attr)
    }
    _createEvent() {
        this.event = document.createElement(this.data.tagName)
    }
    _setAttribute(event, attr) {
        for (const key in attr) {
            switch (key) {
                case 'style': for (const styleKey in attr.style) { event.style[styleKey] = attr.style[styleKey] }; break;
                default: event[key] = event[key]; break;
            }
        }
    }
}